Optimal. Leaf size=120 \[ -\frac {\log (\cos (c+d x))}{a^2 d}-\frac {2 \sec (c+d x)}{a^2 d}-\frac {\sec ^2(c+d x)}{2 a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {\sec ^4(c+d x)}{4 a^2 d}-\frac {2 \sec ^5(c+d x)}{5 a^2 d}+\frac {\sec ^6(c+d x)}{6 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3964, 90}
\begin {gather*} \frac {\sec ^6(c+d x)}{6 a^2 d}-\frac {2 \sec ^5(c+d x)}{5 a^2 d}-\frac {\sec ^4(c+d x)}{4 a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {\sec ^2(c+d x)}{2 a^2 d}-\frac {2 \sec (c+d x)}{a^2 d}-\frac {\log (\cos (c+d x))}{a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rule 3964
Rubi steps
\begin {align*} \int \frac {\tan ^9(c+d x)}{(a+a \sec (c+d x))^2} \, dx &=-\frac {\text {Subst}\left (\int \frac {(a-a x)^4 (a+a x)^2}{x^7} \, dx,x,\cos (c+d x)\right )}{a^8 d}\\ &=-\frac {\text {Subst}\left (\int \left (\frac {a^6}{x^7}-\frac {2 a^6}{x^6}-\frac {a^6}{x^5}+\frac {4 a^6}{x^4}-\frac {a^6}{x^3}-\frac {2 a^6}{x^2}+\frac {a^6}{x}\right ) \, dx,x,\cos (c+d x)\right )}{a^8 d}\\ &=-\frac {\log (\cos (c+d x))}{a^2 d}-\frac {2 \sec (c+d x)}{a^2 d}-\frac {\sec ^2(c+d x)}{2 a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {\sec ^4(c+d x)}{4 a^2 d}-\frac {2 \sec ^5(c+d x)}{5 a^2 d}+\frac {\sec ^6(c+d x)}{6 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.52, size = 125, normalized size = 1.04 \begin {gather*} -\frac {(312 \cos (c+d x)+5 (14+28 \cos (3 (c+d x))+6 \cos (4 (c+d x))+12 \cos (5 (c+d x))+30 \log (\cos (c+d x))+18 \cos (4 (c+d x)) \log (\cos (c+d x))+3 \cos (6 (c+d x)) \log (\cos (c+d x))+9 \cos (2 (c+d x)) (4+5 \log (\cos (c+d x))))) \sec ^6(c+d x)}{480 a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 74, normalized size = 0.62
method | result | size |
derivativedivides | \(\frac {\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{6}-\frac {2 \left (\sec ^{5}\left (d x +c \right )\right )}{5}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{4}+\frac {4 \left (\sec ^{3}\left (d x +c \right )\right )}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{2}-2 \sec \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )\right )}{d \,a^{2}}\) | \(74\) |
default | \(\frac {\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{6}-\frac {2 \left (\sec ^{5}\left (d x +c \right )\right )}{5}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{4}+\frac {4 \left (\sec ^{3}\left (d x +c \right )\right )}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{2}-2 \sec \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )\right )}{d \,a^{2}}\) | \(74\) |
risch | \(\frac {i x}{a^{2}}+\frac {2 i c}{a^{2} d}-\frac {2 \left (30 \,{\mathrm e}^{11 i \left (d x +c \right )}+15 \,{\mathrm e}^{10 i \left (d x +c \right )}+70 \,{\mathrm e}^{9 i \left (d x +c \right )}+90 \,{\mathrm e}^{8 i \left (d x +c \right )}+156 \,{\mathrm e}^{7 i \left (d x +c \right )}+70 \,{\mathrm e}^{6 i \left (d x +c \right )}+156 \,{\mathrm e}^{5 i \left (d x +c \right )}+90 \,{\mathrm e}^{4 i \left (d x +c \right )}+70 \,{\mathrm e}^{3 i \left (d x +c \right )}+15 \,{\mathrm e}^{2 i \left (d x +c \right )}+30 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{15 d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{6}}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{a^{2} d}\) | \(182\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 80, normalized size = 0.67 \begin {gather*} -\frac {\frac {60 \, \log \left (\cos \left (d x + c\right )\right )}{a^{2}} + \frac {120 \, \cos \left (d x + c\right )^{5} + 30 \, \cos \left (d x + c\right )^{4} - 80 \, \cos \left (d x + c\right )^{3} + 15 \, \cos \left (d x + c\right )^{2} + 24 \, \cos \left (d x + c\right ) - 10}{a^{2} \cos \left (d x + c\right )^{6}}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.63, size = 85, normalized size = 0.71 \begin {gather*} -\frac {60 \, \cos \left (d x + c\right )^{6} \log \left (-\cos \left (d x + c\right )\right ) + 120 \, \cos \left (d x + c\right )^{5} + 30 \, \cos \left (d x + c\right )^{4} - 80 \, \cos \left (d x + c\right )^{3} + 15 \, \cos \left (d x + c\right )^{2} + 24 \, \cos \left (d x + c\right ) - 10}{60 \, a^{2} d \cos \left (d x + c\right )^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\tan ^{9}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 223 vs.
\(2 (110) = 220\).
time = 5.85, size = 223, normalized size = 1.86 \begin {gather*} \frac {\frac {60 \, \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right )}{a^{2}} - \frac {60 \, \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right )}{a^{2}} + \frac {\frac {234 \, {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {1005 \, {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {2220 \, {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {2925 \, {\left (\cos \left (d x + c\right ) - 1\right )}^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {1002 \, {\left (\cos \left (d x + c\right ) - 1\right )}^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {147 \, {\left (\cos \left (d x + c\right ) - 1\right )}^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + 19}{a^{2} {\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}^{6}}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.18, size = 193, normalized size = 1.61 \begin {gather*} \frac {2\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{a^2\,d}+\frac {-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {54\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{5}-\frac {32}{15}}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________